package com.szlib.seeker.cron;

import java.text.ParseException;
import java.util.Locale;

import org.junit.jupiter.api.Test;

import net.redhogs.cronparser.CronExpressionDescriptor;
import net.redhogs.cronparser.Options;


public class CronExpressTests4 {
	
	@Test
	public void test() throws ParseException {
		String cronExpression="0 0 18 28–31 * ?";
		cronExpression="1-2 ? 0/1 1,3,6,8,9,11,12,14,15 1/1 1/2";
		Options parserOptions = Options.twentyFourHour();
		parserOptions.setZeroBasedDayOfWeek(false);
		parserOptions.setThrowExceptionOnParseError(false);
		String description = CronExpressionDescriptor.getDescription(cronExpression, parserOptions, Locale.getDefault());
		System.out.println(description);
	}

}
